package io.renren.modules.erp.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.erp.dao.CustomerPriceDao;
import io.renren.modules.erp.entity.CustomerPriceEntity;
import io.renren.modules.erp.service.CustomerPriceService;


@Service("customerPriceService")
public class CustomerPriceServiceImpl extends ServiceImpl<CustomerPriceDao, CustomerPriceEntity> implements CustomerPriceService {
	
	@Autowired
	private CustomerPriceDao customerPriceDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<CustomerPriceEntity> page = this.selectPage(
                new Query<CustomerPriceEntity>(params).getPage(),
                new EntityWrapper<CustomerPriceEntity>()
        );

        return new PageUtils(page);
    }

	@Override
	public List<CustomerPriceEntity> selectByCustmId(Long customerInfoId) {
		List<CustomerPriceEntity> result=customerPriceDao.selectByCustmId(customerInfoId);
		return result;
	}

}
